.TH LN 1 "GNU File Utilities" "FSF" \" -*- nroff -*-
.SH NAME
ln \- make links between files
.SH SYNOPSIS
.B ln
[options] source [dest]
.br
.B ln
[options] source... directory
.br
Options:
.br
[\-bdfinsvF] [\-S backup-suffix] [\-V {numbered,existing,simple}]
[\-\-version-control={numbered,existing,simple}] [\-\-backup] [\-\-directory]
[\-\-force] [\-\-interactive] [\-\-no\-dereference] [\-\-symbolic] [\-\-verbose]
[\-\-suffix=backup-suffix] [\-\-help] [\-\-version]
.SH DESCRIPTION
This documentation is no longer being maintained and may be inaccurate
or incomplete.  The Texinfo documentation is now the authoritative source.
.PP
This manual page
documents the GNU version of
.BR ln .
If the last argument names an existing directory,
.B ln
links each other
given file into a file with the same name in that directory.
If only one file is given, it links that file into the current directory.
Otherwise, if only two files are given, it links the first onto the
second.  It is an error if the last argument is not a directory and
more than two files are given.  It makes hard links by default.
By default, it does not remove existing files.
.SS OPTIONS
.TP
.I "\-b, \-\-backup"
Make backups of files that are about to be removed.
.TP
.I "\-d, \-F, \-\-directory"
Allow the super-user to make hard links to directories.
.TP
.I "\-f, \-\-force"
Remove existing destination files.
.TP
.I "\-i, \-\-interactive"
Prompt whether to remove existing destination files.
.TP
.I "\-n, \-\-no-dereference"
When the specified destination is a symbolic link to a
directory, attempt to replace the symbolic link rather than dereferencing it
to create a link in the directory to which it points.  This option is most
useful in conjunction with \-\-force.
.TP
.I "\-s, \-\-symbolic"
Make symbolic links instead of hard links.
This option produces an error message on systems that do not support
symbolic links.
.TP
.I "\-v, \-\-verbose"
Print the name of each file before linking it.
.TP
.I "\-\-help"
Print a usage message on standard output and exit successfully.
.TP
.I "\-\-version"
Print version information on standard output then exit successfully.
.TP
.I "\-S, \-\-suffix backup-suffix"
The suffix used for making simple backup files can be set with the
.B SIMPLE_BACKUP_SUFFIX
environment variable, which can be overridden by this option.  If
neither of those is given, the default is `~', as it is in Emacs.
.TP
.I "\-V, \-\-version-control {numbered,existing,simple}"
The type of backups made can be set with the
.B VERSION_CONTROL
environment variable, which can be overridden by this option.  If
.B VERSION_CONTROL
is not set and this option is not given, the default backup type is
`existing'.  The value of the
.B VERSION_CONTROL
environment variable and the argument to this option are like the GNU
Emacs `version-control' variable; they also recognize synonyms that
are more descriptive.  The valid values are (unique abbreviations are
accepted):
.RS
.TP
`t' or `numbered'
Always make numbered backups.
.TP
`nil' or `existing'
Make numbered backups of files that already
have them, simple backups of the others.
.TP
`never' or `simple'
Always make simple backups.
